<?php

namespace models;

use system\Model;

class AuthInfo extends Model {
    public function getGroupName($uid = '') {
        $group_id = $this->getGroupInfo($uid);
        if (!$group_id) {
            return false;
        }
        $model = new AuthGroup();

        return $model->getFind($group_id, 'name');
    }

    public function getGroupInfo($uid = '') {
        return $this->getFind(['uid' => $uid], 'group_id');
    }
}
